{% extends 'base.html' %}

{% block page-content %}


{%for i in Userdata %}
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">用户信息</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <p>
                        <a  href="/account/setpasswd/{{i.id}}"><button class="btn btn-primary " type="button">密码修改</button></a>
                    </p>
                </div>

                <div class="col-lg-8">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            用户信息
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="col-lg-6">
                                <div class="panel panel-info">
                                    <div class="panel-heading">
                                        基本信息
                                    </div>
                                 <div class="ibox-content" style="display: block;">
                        <div>
                            <div class="text-left">
                                <table class="table">
                                    <tbody><tr>
                                        <td class="text-navy">用户名</td>
                                        <td>{{i.username}}</td>
                                    </tr>
                                    <tr>
                                        <td class="text-navy">姓名</td>
                                        <td>{{i.nickname}}</td>
                                    </tr>
                                     <tr>
                                        <td class="text-navy">邮箱</td>
                                        <td>{{i.email}}</td>
                                    </tr>
                                    <tr>
                                        <td class="text-navy">部门</td>
                                        <td>{{i.dept}}</td>
                                    </tr>
                                    <tr>
                                        <td class="text-navy">角色</td>
                                        {% for k,v in list_role.items%}
                                            {% if k == i.role%}
                                                <td>{{v}}</td>
                                            {%endif%}
                                        {%endfor%}
                                    </tr>

                                </tbody></table>
                            </div>
                        </div>
                    </div>
                    </div>

                         
                            </div>

                              <div class="col-lg-5">
                                <div class="panel panel-info">
                                    <div class="panel-heading">
                                        其它信息
                                    </div>
                                 <div class="ibox-content" style="display: block;">
                                    <div>
                                        <div class="text-left">
                                            <table class="table">
                                                <tbody>

                                                <tr>
                                                    <td class="text-navy">姓别</td>
                                                    <td>{{i.sex}}</td>
                                                </tr>
                                                <tr>
                                                    <td class="text-navy">最后登录</td>
                                                    <td>{{i.last_login|date:"Y-m-d H:i:s" }}</td>
                                                </tr>
                                                <tr>
                                                    <td class="text-navy">联系方式</td>
                                                    <td>{{i.phone}}</td>
                                                </tr>

                                            </tbody></table>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                             



                            
                            <!-- /.table-responsive -->
                            
                        </div>
                        <!-- /.panel-body -->

                    </div>
                    <!-- /.panel -->
                </div>
            </div>
            <!-- /.row -->
    {%endfor%}
{%endblock%}